import { Badge, Button, Space } from 'antd';


export const AformConfig = [
    {
        type: "Input",
        lable: "IP",
        placenholder: "请输入ip",
        key: "ip",
    },
    {
        type: "Input",
        lable: "UA",
        placenholder: "请输入User Agent",
        key: "userAgent",
    },
    {
        type: "Input",
        lable: "URL",
        placenholder: "请输入路径",
        key: "url",
    },
    {
        type: "Input",
        lable: "地址",
        placenholder: "请输入地址",
        key: "address",
    }, {
        type: "Input",
        lable: "浏览器",
        placenholder: "请输入浏览器",
        key: "browser",
    },
    {
        type: "Input",
        lable: "内核",
        placenholder: "请输入内核",
        key: "engine",
    }, {
        type: "Input",
        lable: "OS",
        placenholder: "请输入操作系统",
        key: "os",
    },
    {
        type: "Input",
        lable: "设备",
        placenholder: "请输入设备",
        key: "device",
    },
    {
        type: "Find",
        text: "收搜"
    },
    {
        type: "Reset",
        text: "重置"
    }
]

export const tableColumns = (
    // PassCommrnt: (id: number, flag: boolean) => void,
    // Recomment: (record: object) => void,
    // Start:(record:any, status:any)=>void,
    Del: (id:any) => void) => {
    return [
        {
            title: 'URL',
            dataIndex: 'url',
            key: 'url',
        },
        {
            title: 'IP',
            dataIndex: 'ip',
            key: 'ip',
        },
        {
            title: '浏览器',
            dataIndex: 'browser',
            key: 'browser',

        },
        {
            title: '内核',
            dataIndex: 'engine',
            key: 'engine',
        },
        {
            title: '操作系统',
            dataIndex: 'os',
            key: 'os',
        },
        {
            title: '设备',
            dataIndex: 'device',
            key: 'device',
           
        },
        {
            title: '地址',
            dataIndex: 'address',
            key: 'address',
           
        },
        {
            title: '访问量',
            dataIndex: 'count',
            key: 'count',
        },
        {
            title: '访问时间',
            dataIndex: 'updateAt',
            key: 'updateAt',
        },
        {
            title: '操作',
            dataIndex: 'action',
            key: 'action',
            render: (_: any, record: any) => {
                // const id=record.id
                console.log(_, record)
                const id = record.id
                return (
                    <Space>
                        <a onClick={() => Del(id)}>删除</a>
                    </Space>
                )
            }
        }
    ];

}